<!DOCTYPE html>  
<html>  
  <head>  
    <title>Objects</title>  
  </head>
  <body>  
    <script type="text/javascript">
       var emp = {id:101, name:"Ann", salary:40000};
       document.write(emp.id+" "+emp.name+" "+emp.salary+"<br>"); 
       
       var emp2 = new Object();  
       emp2.id=102;  
       emp2.name="Bob";  
       emp2.salary=50000;  
       document.write(emp2.id+" "+emp2.name+" "+emp2.salary+"<br>");  
       
       function emp3(id,name,salary){  
            this.id=id;  
            this.name=name;  
            this.salary=salary;  
       }  
       var e = new emp3(103, "Candy", 30000);  
       document.write(e.id+" "+e.name+" "+e.salary);  
    </script> 
  </body>  
</html>